<template>
  <div class="search-component" @click="goToSearch">
    <el-input
      model-value=""
      placeholder="搜索歌曲、歌手、专辑"
      disabled
    >
      <template #prefix>
        <img src="@/assets/icon/tabar/sousuo.png" class="search-icon" />
      </template>
    </el-input>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router'

const router = useRouter()

const goToSearch = () => {
  router.push('/search')
}
</script>

<style lang="scss" scoped>
.search-component {
  width: 100%;
  cursor: pointer;

  .search-icon {
    width: 18px;
    height: 18px;
  }

  :deep(.el-input__wrapper) {
    border-radius: 20px;
    background-color: #f5f5f5;
    box-shadow: none;
    padding: 0 15px;
  }

  :deep(.el-input__inner) {
    height: 36px;
    font-size: 14px;
    cursor: pointer;
  }
}
</style>
